﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace AgilePlannerDT.Display.CustomWidgets
{
    public class ColoredPin : UserControl
    {
        public static readonly Uri PIN_RED = new Uri("src/AgilePlannerDT/Images/pin_red.png", UriKind.Relative);
        public static readonly Uri PIN_BLUE = new Uri("src/AgilePlannerDT/Images/pin_blue.png", UriKind.Relative);
        public static readonly Uri PIN_YELLOW = new Uri("src/AgilePlannerDT/Images/pin_yellow.png", UriKind.Relative);
        public static readonly Uri PIN_GREEN = new Uri("src/AgilePlannerDT/Images/pin_green.png", UriKind.Relative);

        protected Image pin;

        public ColoredPin()
            : this(PIN_RED)
        {
        }


        public ColoredPin(Uri pathToImage)
        {
            Width = 65;
            Height = 74;

            Background = Brushes.Transparent;

            pin = new Image();
            pin.Source = new BitmapImage(PIN_RED);
            pin.HorizontalAlignment = HorizontalAlignment.Stretch;
            pin.VerticalAlignment = VerticalAlignment.Stretch;
            pin.Stretch = Stretch.Fill;

            AddChild(pin);
        }
    }
}
